import java.util.ArrayList;
import java.util.HashMap;

import com.jchy.graph.Edge;

import com.jchy.graph.Graph;
import com.jchy.graph.Vertex;
import com.jchy.graph.core.GraphItData;
import com.jchy.graph.core.Pixel;


public class GraphItDataCreateData {
	public static void main(String[] args)
	{
		Long aLong = new Long(1L);
		Long bLong = new Long(2L);
		Long cLong = new Long(3L);
		Pixel aPixel = new Pixel(30,30);
		Pixel bPixel = new Pixel(70,30);
		Pixel cPixel = new Pixel(70,80);
		
		Graph aGraph = new Graph(Graph.BI_DIRECTIONAL);
		Vertex aVertex = new Vertex(aLong);
		Vertex bVertex = new Vertex(bLong);
		Vertex cVertex = new Vertex(cLong);
		HashMap<Vertex,Pixel> map = new HashMap<Vertex,Pixel>();
		map.put(aVertex, aPixel);
		map.put(bVertex, bPixel);
		map.put(cVertex, cPixel);
		
		ArrayList<Vertex >selected = new ArrayList<Vertex>();
		selected.add(aVertex);
		selected.add(cVertex);
		
		Edge abEdge = new Edge(aVertex, bVertex);
		aGraph.addEdge(abEdge);
		Edge bcEdge = new Edge(bVertex, cVertex);
		aGraph.addEdge(bcEdge);
		Edge acEdge = new Edge(aVertex, cVertex);
		aGraph.addEdge(acEdge);
		
		GraphItData gid = new GraphItData();
		gid.setAGraph(aGraph);
		gid.setMap(map);
		gid.setSelected(selected);
		
		gid.saveAs("C:/MyProjects/Graph/data/simplegraph.txt");

	}
	

}
